package com.seminario.spring.domain;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;


@Embeddable
public class AmistadPK implements Serializable {
    /**
	 * 
	 */
	private static final long serialVersionUID = -5632265285313866666L;
    private Integer perfilId;
    private Integer amigosId;

    public AmistadPK() {
    }

    public AmistadPK(int perfilId, int amigosId) {
        this.perfilId = perfilId;
        this.amigosId = amigosId;
    }

    @Basic(optional = false)
    @NotNull
    public int getPerfilId() {
        return perfilId;
    }

    public void setPerfilId(int perfilId) {
        this.perfilId = perfilId;
    }

    @Basic(optional = false)
    @NotNull
    public int getAmigosId() {
        return amigosId;
    }

    public void setAmigosId(int amigosId) {
        this.amigosId = amigosId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) perfilId;
        hash += (int) amigosId;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof AmistadPK)) {
            return false;
        }
        AmistadPK other = (AmistadPK) object;
        if (this.perfilId != other.perfilId) {
            return false;
        }
        if (this.amigosId != other.amigosId) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.domain.PerfilPerfilPK[ perfilid=" + perfilId + ", amigosId=" + amigosId + " ]";
    }
    
}
